﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

using DataLayer.Entities;

namespace DataLayer
{
    public class UsersManager
    {
        public static int CheckLogin(string email, string password)
        {
            int id = 0;
            String sql = "select AccountID from Accounts where Email='" + email + "' and Password='" + password + "'";

            DataTable  tb = dbConnect.ExecuteQuery(sql);

            if (tb.Rows.Count > 0)
            {
                id = Convert.ToInt32(tb.Rows[0][0].ToString());
            }
            return id;
        }
    }
}
